<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script src="https://momentjs.cn/downloads/moment.js"></script>
    <script>
        const date = new Date()
        // const date = new Date('2025-3-6')
        console.log(date);
        console.log(typeof date);
        console.log(date.getFullYear);
        console.log(date.getMonth);
        console.log(date.getDate);
        console.log(date.getDay);
        console.log(date.getMinutes);
        console.log(date.getSeconds);
        console.log(date.getMilliseconds);

        // 零填充 str.padStart()
        let str = '36'
        console.log(str.padStart(4, 0));


        // int 快

        // 日期库
        console.log(moment().format('MMMM Do YYYY, h:mm:ss a'));;
        console.log(moment().format());







    </script>
</body>

</html>